\(\int (g+h x)^3 (a+b \log (c (d (e+f x)^p)^q)) \, dx\) [420]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 158 \[ \int (g+h x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=-\frac {b (f g-e h)^3 p q x}{4 f^3}-\frac {b (f g-e h)^2 p q (g+h x)^2}{8 f^2 h}-\frac {b (f g-e h) p q (g+h x)^3}{12 f h}-\frac {b p q (g+h x)^4}{16 h}-\frac {b (f g-e h)^4 p q \log (e+f x)}{4 f^4 h}+\frac {(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{4 h} \]

[Out]

-1/4*b*(-e*h+f*g)^3*p*q*x/f^3-1/8*b*(-e*h+f*g)^2*p*q*(h*x+g)^2/f^2/h-1/12*b*(-e*h+f*g)*p*q*(h*x+g)^3/f/h-1/16*
b*p*q*(h*x+g)^4/h-1/4*b*(-e*h+f*g)^4*p*q*ln(f*x+e)/f^4/h+1/4*(h*x+g)^4*(a+b*ln(c*(d*(f*x+e)^p)^q))/h

Rubi [A] (verified)

Time = 0.12 (sec) , antiderivative size = 158, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {2442, 45, 2495} \[ \int (g+h x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=\frac {(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{4 h}-\frac {b p q (f g-e h)^4 \log (e+f x)}{4 f^4 h}-\frac {b p q x (f g-e h)^3}{4 f^3}-\frac {b p q (g+h x)^2 (f g-e h)^2}{8 f^2 h}-\frac {b p q (g+h x)^3 (f g-e h)}{12 f h}-\frac {b p q (g+h x)^4}{16 h} \]

[In]

Int[(g + h*x)^3*(a + b*Log[c*(d*(e + f*x)^p)^q]),x]

[Out]

-1/4*(b*(f*g - e*h)^3*p*q*x)/f^3 - (b*(f*g - e*h)^2*p*q*(g + h*x)^2)/(8*f^2*h) - (b*(f*g - e*h)*p*q*(g + h*x)^
3)/(12*f*h) - (b*p*q*(g + h*x)^4)/(16*h) - (b*(f*g - e*h)^4*p*q*Log[e + f*x])/(4*f^4*h) + ((g + h*x)^4*(a + b*
Log[c*(d*(e + f*x)^p)^q]))/(4*h)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2442

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[(f + g*
x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/(g*(q + 1))), x] - Dist[b*e*(n/(g*(q + 1))), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2495

Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_.)*(u_.), x_Symbol] :> Subst[Int[u*(
a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e,
f, m, n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[IntHide[u*(a + b*Log[c*d^n*(e
+ f*x)^(m*n)])^p, x]]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int (g+h x)^3 \left (a+b \log \left (c d^q (e+f x)^{p q}\right )\right ) \, dx,c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = \frac {(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{4 h}-\text {Subst}\left (\frac {(b f p q) \int \frac {(g+h x)^4}{e+f x} \, dx}{4 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = \frac {(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{4 h}-\text {Subst}\left (\frac {(b f p q) \int \left (\frac {h (f g-e h)^3}{f^4}+\frac {(f g-e h)^4}{f^4 (e+f x)}+\frac {h (f g-e h)^2 (g+h x)}{f^3}+\frac {h (f g-e h) (g+h x)^2}{f^2}+\frac {h (g+h x)^3}{f}\right ) \, dx}{4 h},c d^q (e+f x)^{p q},c \left (d (e+f x)^p\right )^q\right ) \\ & = -\frac {b (f g-e h)^3 p q x}{4 f^3}-\frac {b (f g-e h)^2 p q (g+h x)^2}{8 f^2 h}-\frac {b (f g-e h) p q (g+h x)^3}{12 f h}-\frac {b p q (g+h x)^4}{16 h}-\frac {b (f g-e h)^4 p q \log (e+f x)}{4 f^4 h}+\frac {(g+h x)^4 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{4 h} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 232, normalized size of antiderivative = 1.47 \[ \int (g+h x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=\frac {f x \left (12 a f^3 \left (4 g^3+6 g^2 h x+4 g h^2 x^2+h^3 x^3\right )-b p q \left (-12 e^3 h^3+6 e^2 f h^2 (8 g+h x)-4 e f^2 h \left (18 g^2+6 g h x+h^2 x^2\right )+f^3 \left (48 g^3+36 g^2 h x+16 g h^2 x^2+3 h^3 x^3\right )\right )\right )-12 b e^2 h \left (6 f^2 g^2-4 e f g h+e^2 h^2\right ) p q \log (e+f x)+12 b f^3 \left (4 e g^3+f x \left (4 g^3+6 g^2 h x+4 g h^2 x^2+h^3 x^3\right )\right ) \log \left (c \left (d (e+f x)^p\right )^q\right )}{48 f^4} \]

[In]

Integrate[(g + h*x)^3*(a + b*Log[c*(d*(e + f*x)^p)^q]),x]

[Out]

(f*x*(12*a*f^3*(4*g^3 + 6*g^2*h*x + 4*g*h^2*x^2 + h^3*x^3) - b*p*q*(-12*e^3*h^3 + 6*e^2*f*h^2*(8*g + h*x) - 4*
e*f^2*h*(18*g^2 + 6*g*h*x + h^2*x^2) + f^3*(48*g^3 + 36*g^2*h*x + 16*g*h^2*x^2 + 3*h^3*x^3))) - 12*b*e^2*h*(6*
f^2*g^2 - 4*e*f*g*h + e^2*h^2)*p*q*Log[e + f*x] + 12*b*f^3*(4*e*g^3 + f*x*(4*g^3 + 6*g^2*h*x + 4*g*h^2*x^2 + h
^3*x^3))*Log[c*(d*(e + f*x)^p)^q])/(48*f^4)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(465\) vs. \(2(146)=292\).

Time = 5.98 (sec) , antiderivative size = 466, normalized size of antiderivative = 2.95

method result size
parallelrisch \(-\frac {-48 \ln \left (f x +e \right ) b \,e^{3} f g \,h^{2} p q +72 \ln \left (f x +e \right ) b \,e^{2} f^{2} g^{2} h p q -24 x^{2} b e \,f^{3} g \,h^{2} p q +48 x b \,e^{2} f^{2} g \,h^{2} p q -48 x^{3} a \,f^{4} g \,h^{2}-72 x^{2} a \,f^{4} g^{2} h -48 x \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right ) b \,f^{4} g^{3}+48 \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right ) b e \,f^{3} g^{3}-48 b e \,f^{3} g^{3} p q +12 b \,e^{4} h^{3} p q -72 x b e \,f^{3} g^{2} h p q +72 b \,e^{2} g^{2} h p q \,f^{2}-48 b \,e^{3} f g \,h^{2} p q -12 x^{4} \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right ) b \,f^{4} h^{3}+48 a e \,g^{3} f^{3}-72 x^{2} \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right ) b \,f^{4} g^{2} h +48 x b \,f^{4} g^{3} p q +12 \ln \left (f x +e \right ) b \,e^{4} h^{3} p q +3 x^{4} b \,f^{4} h^{3} p q -48 x^{3} \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right ) b \,f^{4} g \,h^{2}-12 x^{4} a \,f^{4} h^{3}-48 x a \,f^{4} g^{3}+36 x^{2} b \,f^{4} g^{2} h p q -12 x b \,e^{3} f \,h^{3} p q -96 \ln \left (f x +e \right ) b e \,f^{3} g^{3} p q -4 x^{3} b e \,f^{3} h^{3} p q +16 x^{3} b \,f^{4} g \,h^{2} p q +6 x^{2} b \,e^{2} f^{2} h^{3} p q}{48 f^{4}}\) \(466\)

[In]

int((h*x+g)^3*(a+b*ln(c*(d*(f*x+e)^p)^q)),x,method=_RETURNVERBOSE)

[Out]

-1/48*(-48*ln(f*x+e)*b*e^3*f*g*h^2*p*q+72*ln(f*x+e)*b*e^2*f^2*g^2*h*p*q-24*x^2*b*e*f^3*g*h^2*p*q+48*x*b*e^2*f^
2*g*h^2*p*q-48*x^3*a*f^4*g*h^2-72*x^2*a*f^4*g^2*h-48*x*ln(c*(d*(f*x+e)^p)^q)*b*f^4*g^3+48*ln(c*(d*(f*x+e)^p)^q
)*b*e*f^3*g^3-48*b*e*f^3*g^3*p*q+12*b*e^4*h^3*p*q-72*x*b*e*f^3*g^2*h*p*q+72*b*e^2*g^2*h*p*q*f^2-48*b*e^3*f*g*h
^2*p*q-12*x^4*ln(c*(d*(f*x+e)^p)^q)*b*f^4*h^3+48*a*e*g^3*f^3-72*x^2*ln(c*(d*(f*x+e)^p)^q)*b*f^4*g^2*h+48*x*b*f
^4*g^3*p*q+12*ln(f*x+e)*b*e^4*h^3*p*q+3*x^4*b*f^4*h^3*p*q-48*x^3*ln(c*(d*(f*x+e)^p)^q)*b*f^4*g*h^2-12*x^4*a*f^
4*h^3-48*x*a*f^4*g^3+36*x^2*b*f^4*g^2*h*p*q-12*x*b*e^3*f*h^3*p*q-96*ln(f*x+e)*b*e*f^3*g^3*p*q-4*x^3*b*e*f^3*h^
3*p*q+16*x^3*b*f^4*g*h^2*p*q+6*x^2*b*e^2*f^2*h^3*p*q)/f^4

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 405 vs. \(2 (146) = 292\).

Time = 0.36 (sec) , antiderivative size = 405, normalized size of antiderivative = 2.56 \[ \int (g+h x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=-\frac {3 \, {\left (b f^{4} h^{3} p q - 4 \, a f^{4} h^{3}\right )} x^{4} - 4 \, {\left (12 \, a f^{4} g h^{2} - {\left (4 \, b f^{4} g h^{2} - b e f^{3} h^{3}\right )} p q\right )} x^{3} - 6 \, {\left (12 \, a f^{4} g^{2} h - {\left (6 \, b f^{4} g^{2} h - 4 \, b e f^{3} g h^{2} + b e^{2} f^{2} h^{3}\right )} p q\right )} x^{2} - 12 \, {\left (4 \, a f^{4} g^{3} - {\left (4 \, b f^{4} g^{3} - 6 \, b e f^{3} g^{2} h + 4 \, b e^{2} f^{2} g h^{2} - b e^{3} f h^{3}\right )} p q\right )} x - 12 \, {\left (b f^{4} h^{3} p q x^{4} + 4 \, b f^{4} g h^{2} p q x^{3} + 6 \, b f^{4} g^{2} h p q x^{2} + 4 \, b f^{4} g^{3} p q x + {\left (4 \, b e f^{3} g^{3} - 6 \, b e^{2} f^{2} g^{2} h + 4 \, b e^{3} f g h^{2} - b e^{4} h^{3}\right )} p q\right )} \log \left (f x + e\right ) - 12 \, {\left (b f^{4} h^{3} x^{4} + 4 \, b f^{4} g h^{2} x^{3} + 6 \, b f^{4} g^{2} h x^{2} + 4 \, b f^{4} g^{3} x\right )} \log \left (c\right ) - 12 \, {\left (b f^{4} h^{3} q x^{4} + 4 \, b f^{4} g h^{2} q x^{3} + 6 \, b f^{4} g^{2} h q x^{2} + 4 \, b f^{4} g^{3} q x\right )} \log \left (d\right )}{48 \, f^{4}} \]

[In]

integrate((h*x+g)^3*(a+b*log(c*(d*(f*x+e)^p)^q)),x, algorithm="fricas")

[Out]

-1/48*(3*(b*f^4*h^3*p*q - 4*a*f^4*h^3)*x^4 - 4*(12*a*f^4*g*h^2 - (4*b*f^4*g*h^2 - b*e*f^3*h^3)*p*q)*x^3 - 6*(1
2*a*f^4*g^2*h - (6*b*f^4*g^2*h - 4*b*e*f^3*g*h^2 + b*e^2*f^2*h^3)*p*q)*x^2 - 12*(4*a*f^4*g^3 - (4*b*f^4*g^3 -
6*b*e*f^3*g^2*h + 4*b*e^2*f^2*g*h^2 - b*e^3*f*h^3)*p*q)*x - 12*(b*f^4*h^3*p*q*x^4 + 4*b*f^4*g*h^2*p*q*x^3 + 6*
b*f^4*g^2*h*p*q*x^2 + 4*b*f^4*g^3*p*q*x + (4*b*e*f^3*g^3 - 6*b*e^2*f^2*g^2*h + 4*b*e^3*f*g*h^2 - b*e^4*h^3)*p*
q)*log(f*x + e) - 12*(b*f^4*h^3*x^4 + 4*b*f^4*g*h^2*x^3 + 6*b*f^4*g^2*h*x^2 + 4*b*f^4*g^3*x)*log(c) - 12*(b*f^
4*h^3*q*x^4 + 4*b*f^4*g*h^2*q*x^3 + 6*b*f^4*g^2*h*q*x^2 + 4*b*f^4*g^3*q*x)*log(d))/f^4

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 457 vs. \(2 (139) = 278\).

Time = 2.50 (sec) , antiderivative size = 457, normalized size of antiderivative = 2.89 \[ \int (g+h x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=\begin {cases} a g^{3} x + \frac {3 a g^{2} h x^{2}}{2} + a g h^{2} x^{3} + \frac {a h^{3} x^{4}}{4} - \frac {b e^{4} h^{3} \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{4 f^{4}} + \frac {b e^{3} g h^{2} \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{f^{3}} + \frac {b e^{3} h^{3} p q x}{4 f^{3}} - \frac {3 b e^{2} g^{2} h \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{2 f^{2}} - \frac {b e^{2} g h^{2} p q x}{f^{2}} - \frac {b e^{2} h^{3} p q x^{2}}{8 f^{2}} + \frac {b e g^{3} \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{f} + \frac {3 b e g^{2} h p q x}{2 f} + \frac {b e g h^{2} p q x^{2}}{2 f} + \frac {b e h^{3} p q x^{3}}{12 f} - b g^{3} p q x + b g^{3} x \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )} - \frac {3 b g^{2} h p q x^{2}}{4} + \frac {3 b g^{2} h x^{2} \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{2} - \frac {b g h^{2} p q x^{3}}{3} + b g h^{2} x^{3} \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )} - \frac {b h^{3} p q x^{4}}{16} + \frac {b h^{3} x^{4} \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{4} & \text {for}\: f \neq 0 \\\left (a + b \log {\left (c \left (d e^{p}\right )^{q} \right )}\right ) \left (g^{3} x + \frac {3 g^{2} h x^{2}}{2} + g h^{2} x^{3} + \frac {h^{3} x^{4}}{4}\right ) & \text {otherwise} \end {cases} \]

[In]

integrate((h*x+g)**3*(a+b*ln(c*(d*(f*x+e)**p)**q)),x)

[Out]

Piecewise((a*g**3*x + 3*a*g**2*h*x**2/2 + a*g*h**2*x**3 + a*h**3*x**4/4 - b*e**4*h**3*log(c*(d*(e + f*x)**p)**
q)/(4*f**4) + b*e**3*g*h**2*log(c*(d*(e + f*x)**p)**q)/f**3 + b*e**3*h**3*p*q*x/(4*f**3) - 3*b*e**2*g**2*h*log
(c*(d*(e + f*x)**p)**q)/(2*f**2) - b*e**2*g*h**2*p*q*x/f**2 - b*e**2*h**3*p*q*x**2/(8*f**2) + b*e*g**3*log(c*(
d*(e + f*x)**p)**q)/f + 3*b*e*g**2*h*p*q*x/(2*f) + b*e*g*h**2*p*q*x**2/(2*f) + b*e*h**3*p*q*x**3/(12*f) - b*g*
*3*p*q*x + b*g**3*x*log(c*(d*(e + f*x)**p)**q) - 3*b*g**2*h*p*q*x**2/4 + 3*b*g**2*h*x**2*log(c*(d*(e + f*x)**p
)**q)/2 - b*g*h**2*p*q*x**3/3 + b*g*h**2*x**3*log(c*(d*(e + f*x)**p)**q) - b*h**3*p*q*x**4/16 + b*h**3*x**4*lo
g(c*(d*(e + f*x)**p)**q)/4, Ne(f, 0)), ((a + b*log(c*(d*e**p)**q))*(g**3*x + 3*g**2*h*x**2/2 + g*h**2*x**3 + h
**3*x**4/4), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 304 vs. \(2 (146) = 292\).

Time = 0.20 (sec) , antiderivative size = 304, normalized size of antiderivative = 1.92 \[ \int (g+h x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=\frac {1}{4} \, b h^{3} x^{4} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + \frac {1}{4} \, a h^{3} x^{4} - b f g^{3} p q {\left (\frac {x}{f} - \frac {e \log \left (f x + e\right )}{f^{2}}\right )} - \frac {1}{48} \, b f h^{3} p q {\left (\frac {12 \, e^{4} \log \left (f x + e\right )}{f^{5}} + \frac {3 \, f^{3} x^{4} - 4 \, e f^{2} x^{3} + 6 \, e^{2} f x^{2} - 12 \, e^{3} x}{f^{4}}\right )} + \frac {1}{6} \, b f g h^{2} p q {\left (\frac {6 \, e^{3} \log \left (f x + e\right )}{f^{4}} - \frac {2 \, f^{2} x^{3} - 3 \, e f x^{2} + 6 \, e^{2} x}{f^{3}}\right )} - \frac {3}{4} \, b f g^{2} h p q {\left (\frac {2 \, e^{2} \log \left (f x + e\right )}{f^{3}} + \frac {f x^{2} - 2 \, e x}{f^{2}}\right )} + b g h^{2} x^{3} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a g h^{2} x^{3} + \frac {3}{2} \, b g^{2} h x^{2} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + \frac {3}{2} \, a g^{2} h x^{2} + b g^{3} x \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a g^{3} x \]

[In]

integrate((h*x+g)^3*(a+b*log(c*(d*(f*x+e)^p)^q)),x, algorithm="maxima")

[Out]

1/4*b*h^3*x^4*log(((f*x + e)^p*d)^q*c) + 1/4*a*h^3*x^4 - b*f*g^3*p*q*(x/f - e*log(f*x + e)/f^2) - 1/48*b*f*h^3
*p*q*(12*e^4*log(f*x + e)/f^5 + (3*f^3*x^4 - 4*e*f^2*x^3 + 6*e^2*f*x^2 - 12*e^3*x)/f^4) + 1/6*b*f*g*h^2*p*q*(6
*e^3*log(f*x + e)/f^4 - (2*f^2*x^3 - 3*e*f*x^2 + 6*e^2*x)/f^3) - 3/4*b*f*g^2*h*p*q*(2*e^2*log(f*x + e)/f^3 + (
f*x^2 - 2*e*x)/f^2) + b*g*h^2*x^3*log(((f*x + e)^p*d)^q*c) + a*g*h^2*x^3 + 3/2*b*g^2*h*x^2*log(((f*x + e)^p*d)
^q*c) + 3/2*a*g^2*h*x^2 + b*g^3*x*log(((f*x + e)^p*d)^q*c) + a*g^3*x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 987 vs. \(2 (146) = 292\).

Time = 0.34 (sec) , antiderivative size = 987, normalized size of antiderivative = 6.25 \[ \int (g+h x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=\text {Too large to display} \]

[In]

integrate((h*x+g)^3*(a+b*log(c*(d*(f*x+e)^p)^q)),x, algorithm="giac")

[Out]

(f*x + e)*b*g^3*p*q*log(f*x + e)/f + 3/2*(f*x + e)^2*b*g^2*h*p*q*log(f*x + e)/f^2 - 3*(f*x + e)*b*e*g^2*h*p*q*
log(f*x + e)/f^2 + (f*x + e)^3*b*g*h^2*p*q*log(f*x + e)/f^3 - 3*(f*x + e)^2*b*e*g*h^2*p*q*log(f*x + e)/f^3 + 3
*(f*x + e)*b*e^2*g*h^2*p*q*log(f*x + e)/f^3 + 1/4*(f*x + e)^4*b*h^3*p*q*log(f*x + e)/f^4 - (f*x + e)^3*b*e*h^3
*p*q*log(f*x + e)/f^4 + 3/2*(f*x + e)^2*b*e^2*h^3*p*q*log(f*x + e)/f^4 - (f*x + e)*b*e^3*h^3*p*q*log(f*x + e)/
f^4 - (f*x + e)*b*g^3*p*q/f - 3/4*(f*x + e)^2*b*g^2*h*p*q/f^2 + 3*(f*x + e)*b*e*g^2*h*p*q/f^2 - 1/3*(f*x + e)^
3*b*g*h^2*p*q/f^3 + 3/2*(f*x + e)^2*b*e*g*h^2*p*q/f^3 - 3*(f*x + e)*b*e^2*g*h^2*p*q/f^3 - 1/16*(f*x + e)^4*b*h
^3*p*q/f^4 + 1/3*(f*x + e)^3*b*e*h^3*p*q/f^4 - 3/4*(f*x + e)^2*b*e^2*h^3*p*q/f^4 + (f*x + e)*b*e^3*h^3*p*q/f^4
 + (f*x + e)*b*g^3*q*log(d)/f + 3/2*(f*x + e)^2*b*g^2*h*q*log(d)/f^2 - 3*(f*x + e)*b*e*g^2*h*q*log(d)/f^2 + (f
*x + e)^3*b*g*h^2*q*log(d)/f^3 - 3*(f*x + e)^2*b*e*g*h^2*q*log(d)/f^3 + 3*(f*x + e)*b*e^2*g*h^2*q*log(d)/f^3 +
 1/4*(f*x + e)^4*b*h^3*q*log(d)/f^4 - (f*x + e)^3*b*e*h^3*q*log(d)/f^4 + 3/2*(f*x + e)^2*b*e^2*h^3*q*log(d)/f^
4 - (f*x + e)*b*e^3*h^3*q*log(d)/f^4 + (f*x + e)*b*g^3*log(c)/f + 3/2*(f*x + e)^2*b*g^2*h*log(c)/f^2 - 3*(f*x
+ e)*b*e*g^2*h*log(c)/f^2 + (f*x + e)^3*b*g*h^2*log(c)/f^3 - 3*(f*x + e)^2*b*e*g*h^2*log(c)/f^3 + 3*(f*x + e)*
b*e^2*g*h^2*log(c)/f^3 + 1/4*(f*x + e)^4*b*h^3*log(c)/f^4 - (f*x + e)^3*b*e*h^3*log(c)/f^4 + 3/2*(f*x + e)^2*b
*e^2*h^3*log(c)/f^4 - (f*x + e)*b*e^3*h^3*log(c)/f^4 + (f*x + e)*a*g^3/f + 3/2*(f*x + e)^2*a*g^2*h/f^2 - 3*(f*
x + e)*a*e*g^2*h/f^2 + (f*x + e)^3*a*g*h^2/f^3 - 3*(f*x + e)^2*a*e*g*h^2/f^3 + 3*(f*x + e)*a*e^2*g*h^2/f^3 + 1
/4*(f*x + e)^4*a*h^3/f^4 - (f*x + e)^3*a*e*h^3/f^4 + 3/2*(f*x + e)^2*a*e^2*h^3/f^4 - (f*x + e)*a*e^3*h^3/f^4

Mupad [B] (verification not implemented)

Time = 1.54 (sec) , antiderivative size = 370, normalized size of antiderivative = 2.34 \[ \int (g+h x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\,\left (b\,g^3\,x+\frac {3\,b\,g^2\,h\,x^2}{2}+b\,g\,h^2\,x^3+\frac {b\,h^3\,x^4}{4}\right )-x^2\,\left (\frac {e\,\left (\frac {h^2\,\left (a\,e\,h+3\,a\,f\,g-b\,f\,g\,p\,q\right )}{f}-\frac {e\,h^3\,\left (4\,a-b\,p\,q\right )}{4\,f}\right )}{2\,f}-\frac {3\,g\,h\,\left (2\,a\,e\,h+2\,a\,f\,g-b\,f\,g\,p\,q\right )}{4\,f}\right )+x\,\left (\frac {4\,a\,f\,g^3+12\,a\,e\,g^2\,h-4\,b\,f\,g^3\,p\,q}{4\,f}+\frac {e\,\left (\frac {e\,\left (\frac {h^2\,\left (a\,e\,h+3\,a\,f\,g-b\,f\,g\,p\,q\right )}{f}-\frac {e\,h^3\,\left (4\,a-b\,p\,q\right )}{4\,f}\right )}{f}-\frac {3\,g\,h\,\left (2\,a\,e\,h+2\,a\,f\,g-b\,f\,g\,p\,q\right )}{2\,f}\right )}{f}\right )+x^3\,\left (\frac {h^2\,\left (a\,e\,h+3\,a\,f\,g-b\,f\,g\,p\,q\right )}{3\,f}-\frac {e\,h^3\,\left (4\,a-b\,p\,q\right )}{12\,f}\right )-\frac {\ln \left (e+f\,x\right )\,\left (b\,p\,q\,e^4\,h^3-4\,b\,p\,q\,e^3\,f\,g\,h^2+6\,b\,p\,q\,e^2\,f^2\,g^2\,h-4\,b\,p\,q\,e\,f^3\,g^3\right )}{4\,f^4}+\frac {h^3\,x^4\,\left (4\,a-b\,p\,q\right )}{16} \]

[In]

int((g + h*x)^3*(a + b*log(c*(d*(e + f*x)^p)^q)),x)

[Out]

log(c*(d*(e + f*x)^p)^q)*((b*h^3*x^4)/4 + b*g^3*x + (3*b*g^2*h*x^2)/2 + b*g*h^2*x^3) - x^2*((e*((h^2*(a*e*h +
3*a*f*g - b*f*g*p*q))/f - (e*h^3*(4*a - b*p*q))/(4*f)))/(2*f) - (3*g*h*(2*a*e*h + 2*a*f*g - b*f*g*p*q))/(4*f))
 + x*((4*a*f*g^3 + 12*a*e*g^2*h - 4*b*f*g^3*p*q)/(4*f) + (e*((e*((h^2*(a*e*h + 3*a*f*g - b*f*g*p*q))/f - (e*h^
3*(4*a - b*p*q))/(4*f)))/f - (3*g*h*(2*a*e*h + 2*a*f*g - b*f*g*p*q))/(2*f)))/f) + x^3*((h^2*(a*e*h + 3*a*f*g -
 b*f*g*p*q))/(3*f) - (e*h^3*(4*a - b*p*q))/(12*f)) - (log(e + f*x)*(b*e^4*h^3*p*q - 4*b*e*f^3*g^3*p*q + 6*b*e^
2*f^2*g^2*h*p*q - 4*b*e^3*f*g*h^2*p*q))/(4*f^4) + (h^3*x^4*(4*a - b*p*q))/16